<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>参数配置</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${s.base}/css/base/base.css?123456" media="all" /></head>

<body class="childrenBody">
<form class="layui-form">
	<input type="hidden" id="id" name="id" value="${webConfig.id}" />

	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;小程序名称</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="name" value="${webConfig.name}" placeholder="请输入小程序名称" lay-verify="required" autocomplete="off" />
		</div>
	</div>

	<div class="layui-form-item layui-row layui-col-xs12" id="imageShow">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;小程序logo</label>
		<div class="layui-input-block">
			<!--单图片开始-->
			<div class="layui-input-block cy-uploadpic-ctn" id="image"  style=" float:left;margin:10px 0!important;position:relative; width: 90px; height: 90px;">
			</div>
			<!--单图片结束-->
		</div>
	</div>

	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;房产管理人手机号</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="hostManagePhone" value="${webConfig.hostManagePhone}" placeholder="请输入房产管理人手机号" lay-verify="required" autocomplete="off" />
		</div>
	</div>

	<!--<div class="layui-form-item layui-row layui-col-xs12" >
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;服务保障图片</label>
		<div class="layui-input-block">
			&lt;!&ndash;单图片开始&ndash;&gt;
			<div class="layui-input-block cy-uploadpic-ctn" id="indexImage"  style=" float:left;margin:10px 0!important;position:relative; width: 90px; height: 90px;">
			</div>
			&lt;!&ndash;单图片结束&ndash;&gt;
		</div>
	</div>-->

	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;佣金提现描述</label>
		<div class="layui-input-block">
			<textarea class="layui-textarea" name="priceMsg"  id="priceMsg" lay-verify="content" placeholder="请输入内容">${webConfig.priceMsg}</textarea></div>
	</div>

	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			&nbsp;&nbsp;协议名称</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="agreeName" value="${webConfig.agreeName}" placeholder="请输入协议名称" autocomplete="off" />
		</div>
	</div>

	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;协议内容</label>
		<div class="layui-input-block">
			<textarea class="layui-textarea" name="agreeContent"  id="agreeContent" lay-verify="content" placeholder="请输入协议内容">${webConfig.agreeContent}</textarea></div>
	</div>

	<!--<div class="layui-form-item layui-row layui-col-xs12" >
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;订单分配类型</label>
		<div class="layui-input-block">
			<select class="form-control" name="recoveryType" lay-verify="required" id="recoveryType"></select>
		</div>
	</div>-->

	<div class="layui-form-item layui-row layui-col-xs12">
		<div class="layui-input-block">
			<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="submitBtn">确定</button>
			<!--<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary cancel">取消</button>-->
		</div>
	</div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/base.js"></script>
<script type="text/javascript" src="${s.base}/lib/KnifeZ/ace/ace.js"  charset="utf-8"></script>
<script type="text/javascript">layui.use(['form', 'jquery', 'baseUtil', 'pageUtil','fileUtil','richTxtUtil'],
    function() {
        var form = layui.form,
            $ = layui.jquery,
            fileUtil = layui.fileUtil,
			richTxtUtil = layui.richTxtUtil,
            baseUtil = layui.baseUtil,
            pageUtil = layui.pageUtil;

        fileUtil.uploadImageNoSave('image',"web/config","${webConfig.image}");

        fileUtil.uploadImageNoSave('indexImage',"web/config","${webConfig.indexImage}");

		var index=richTxtUtil.layeditKnifezBuild("priceMsg",300);
		var agreeIndex=richTxtUtil.layeditKnifezBuild("agreeContent",300);

       /* pageUtil.initDict("recovery_dync_type",
            function(dictData) {
                pageUtil.showDict($("#recoveryType"), pageUtil.aceeptDictContentList(dictData, "recovery_dync_type"), "", '${webConfig.recoveryType}');
            });*/


        form.on('submit(submitBtn)',
            function(data) {
				data.field.priceMsg=richTxtUtil.layeditBuildContent(index);
				data.field.agreeContent=richTxtUtil.layeditBuildContent(agreeIndex);
                baseUtil.postMethodResult("/webConfig/addOrUpdate", data.field,
                    function(result) {
                        location.reload();
                    });
                return false;
            });
    });</script>
</body>

</html>